﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>站点设置</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link href="/style/admin/style/adminStyle.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" href="/editor/themes/default/default.css" />
        <link rel="stylesheet" href="/editor/plugins/code/prettify.css" />
        <script charset="utf-8" src="/editor/kindeditor-all.js"></script>
        <script charset="utf-8" src="/editor/zh-CN.js"></script>
        <script charset="utf-8" src="/editor/plugins/code/prettify.js"></script>
    </head>
    <body>
        <div class="wrap">
            <div class="page-title">
                <span class="modular fl"><i class="settings"></i><em>站点设置</em></span>
            </div>
            <form name="man" action="/admin/config/add" method="post" enctype="multipart/form-data">
                {{ csrf_field() }}
                <table class="noborder">
                    <tr>
                        <td style="width:15%;text-align:right;"><b>站点名称：</b></td>
                        <td><input name="name" type="text" class="textBox length-long" value="{{$data->name}}"/></td>
                    </tr>
                    <tr>
                        <td style="text-align:right;"><b>关键词设置：</b></td>
                        <td><input name="keywords" type="text" value="{{$data->keywords}}" class="textBox length-long"/></td>
                    </tr>
                    <tr>
                        <td style="text-align:right;"><b>站点描述：</b></td>
                        <td><input name="discription" type="text" value="{{$data->discription}}" class="textBox length-long"/></td>
                    </tr>
                    <tr>
                        <td style="text-align:right;"><b>ICP备案号：</b></td>
                        <td><input name="icp" type="text" value="{{$data->icp}}" class="textBox length-middle"/></td>
                    </tr> 
                    <tr>
                        <td style="text-align:right;"><b>电子邮件：</b></td>
                        <td><input name="email" type="text" value="{{$data->email}}" class="textBox length-middle"/></td>
                    </tr>
                    <tr>
                        <td style="text-align:right;"><b>联系电话：</b></td>
                        <td><input name="tel" type="text" value="{{$data->tel}}" class="textBox length-middle"/></td>
                    </tr> 
                    <tr>
                        <td style="text-align:right;"><b>网站介绍：</b></td>
                        <td>
                            <textarea id="editor_id" name="tip" style="width:700px;height:300px;"> 
                                 {{$data->tip}}
                            </textarea>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right;"></td>
                        <td><input type="submit" value="保存" class="tdBtn"/></td>
                    </tr>
                </table>
            </form>
        </div>
    </body>
<!--    <script charset="utf-8" src="/editor/kindeditor-all.js"></script>
    <script charset="utf-8" src="/editor/zh-CN.js"></script>-->
    <script>
KindEditor.ready(function (K) {
    var editor = K.create('textarea[name="tip"]', {
        cssPath: '/editor/plugins/code/prettify.css',
        uploadJson: '/editor/php/upload_json.php',
        fileManagerJson: '/editor/php/file_manager_json.php', 
        allowFileManager: true,
        afterCreate: function () {
            var self = this;
            K.ctrl(document, 13, function () {
                self.sync();
                K('form[name=man]')[0].submit();
            });
            K.ctrl(self.edit.doc, 13, function () {
                self.sync();
                K('form[name=man]')[0].submit();
            });
        }
    });
//            html = editor.html();
//            // 同步数据后可以直接取得textarea的value
//            editor.sync();
//            html = document.getElementById('editor_id').value; // 原生API
//            html = K('#editor_id').val(); // KindEditor Node API
//            
//            alert(html);
    prettyPrint();
});
    </script>
</html>